<template>
  <div class="notify" v-if="isOpen">
    <div class="header">
      <span class="el-icon-warning"> 提示</span>
      <span class="close" @click="handlerCloseView">×</span>
    </div>
    <div class="box">
      <div v-for="(item,index) in notifyData" :key="index" class="text item">
        {{ item.createTime }} : <span style="color:red">{{ item.alarmValue }}。</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    notifyData: {
      type: Array,
      default: () => {
        return [];
      },
    },
    isOpen:{
      type:Boolean,
      default:false
    }
  },
  data() {
    return {
      
    };
  },
  methods: {
    handlerCloseView(){
      this.$emit("closeView")
    }
  },
  created() {
   
  },
};
</script>

<style lang="less" scoped>
.notify {
  position: absolute;
  bottom: 5px;
  right: 10px;
  width: 300px;
  height: 200px;

  z-index: 999;
  background-color: #fff;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  .header {
    width: 100%;
    height: 30px;
    padding: 5px;
    padding-left: 10px;
    border-bottom: 1px solid #d5dfe9;
    font-weight: bold;
    color: #58585a;
    display: flex;
    align-items: center;
    .close{
      margin-left: auto;
      cursor: pointer;
      font-size: 24px;
    }
    .close:hover{
      color: red;
      
    }
  }
  .box {
    padding: 5px;
    height: 170px;
    overflow: auto;
      margin-bottom: 10px;
  }
  .text {
    font-size: 13px;
  }
}
</style>